package Controller;
import java.util.UUID;

import Model.Gate;
import Model.GateImpl;


public class RideImpl implements Ride {

	private UUID id;
	private String name;
	private final Type type;
	private State state;
	private int minAge;
	private int minHeight;
	private int capacity;
	private int numKids;
	private Gate entry, exit;
	
	public RideImpl(UUID id, String name, Type type, int minAge, int minHeight, int capacity) {
		this.id = id;
		this.name = name;
		this.type = type;
		this.minAge = minAge;
		this.minHeight = minHeight;
		this.capacity = capacity;
		//entry = new GateImpl(entryGateState);
		//exit = new GateImpl(exitGateState);
	}
	@Override
	public void getOn(UUID kidID) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void getOff(UUID kidID) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void updateCapacity(int num) {
		if(num > 0)
			capacity = num;
	}

	@Override
	public int getNumOfKids() {
		return numKids;
	}

	@Override
	public State getState() {
		return state;
	}

	@Override
	public void updateEnabled() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public boolean isEntryGateOpen() {
		return entry.getState().equals(Gate.State.OPEN);
	}

	@Override
	public boolean isExitGateOpen() {
		return exit.getState().equals(Gate.State.OPEN);
	}
	@Override
	public int getMinAge() {
		return minAge;
	}
	@Override
	public int getMinHeight() {
		return minHeight;
	}
	@Override
	public int getCapacity() {
		return capacity;
	}
	@Override
	public Type getType() {
		return type;
	}
	@Override
	public UUID getID() {
		return id;
	}
	@Override
	public String getName() {
		return name;
	}

}
